#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#

# -*- mode: python; -*-

Import('BuildEnv')

env = BuildEnv.Clone()
env.Append(CPPPATH = env['TOP'])
env.Append(CPPPATH = [env['TOP'] + '/bgp'])
env.Append(CPPPATH = [env['TOP'] + '/db'])
env.Append(CPPPATH = [env['TOP'] + '/io'])
env.Append(CPPPATH = [env['TOP'] + '/ifmap'])
env.Append(CPPPATH = [env['TOP'] + '/base/sandesh'])
env.Append(CPPPATH = [env['TOP'] + '/tools/sandesh/library/common'])

# Generate the source files
SandeshGenFiles = env.SandeshGenCpp('routing_instance_analytics.sandesh')
SandeshGenFiles += env.SandeshGenCpp('service_chaining.sandesh')
SandeshGenFiles += env.SandeshGenOnlyCpp('service_chaining_internal.sandesh')
SandeshGenFiles += env.SandeshGenCpp('static_route.sandesh')
SandeshGenFiles += env.SandeshGenOnlyCpp('static_route_internal.sandesh')
SandeshGenFiles += env.SandeshGenCpp('route_aggregate.sandesh')
SandeshGenFiles += env.SandeshGenCpp('routing_table.sandesh')
SandeshGenFiles += env.SandeshGenOnlyCpp('route_aggregate_internal.sandesh')
SandeshGenSrcs = env.ExtractCpp(SandeshGenFiles)

librouting_instance = env.Library('routing_instance', SandeshGenSrcs + 
                                         ['path_resolver.cc',
                                         'peer_manager.cc',
                                         'route_aggregator.cc',
                                         'routepath_replicator.cc',
                                         'routing_instance.cc',
                                         'rtarget_group.cc',
                                         'rtarget_group_mgr.cc',
                                         'service_chaining.cc',
                                         'show_path_resolver.cc',
                                         'show_route_aggregate.cc',
                                         'show_service_chaining.cc',
                                         'show_static_route.cc',
                                         'static_route.cc'])

